<template>
  <view>
    <view :class="'page' + (D.mbkind == 2 ? ' mbkind2' : '')"
          :style="'--mbbgcolor:' + D.mbbgcolor + ';--mbbgcolor_rgb:' + mbbgcolor_rgb">
      <view :style="'--color:' + color" class="form_detail_BN">
        <image v-if="D.path_b" :src="D.path_b" mode="widthFix"></image>
      </view>
      <view v-if="D.mbkind == 1" class="box">
        <rich-text v-if="!globalUtils.empty(content)" :nodes="content" class="form_detail_C"></rich-text>
      </view>
      <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="regbox">
        <view class="dashed">
          <view v-if="D.mbkind == 2" :style="'background:url(' + D.tbodyIMG + ')left top/100% 100% no-repeat;'"
                class="tbody_img">
            <view class="span">基本资料</view>
          </view>
          <view v-if="ifphoto_s == 1" class="dlpicmore">
            <view class="dl">
              <view class="dt">
                个人近照
                <text class="span">（推荐3张 单张{{ upMaxMB }}M以内）</text>
              </view>
              <view id="piclibox" class="dd piclibox">
                <view class="ul">
                  <view class="li ico" @tap="upFn"></view>
                  <view v-for="(item, item_index) in PARR" :key="item_index" class="li">
                    <image :src="item" mode="aspectFill"></image>

                    <text :data-url="item" class="b ico" @tap.stop.prevent="delFn"></text>
                  </view>
                </view>
              </view>
            </view>
          </view>
          <block v-for="(Farr, idx) in D_basic" :key="idx">
            <view v-if="Farr.subkind == 1" class="dl">
              <view class="dt">{{ Farr.title }}</view>
              <view class="dd">
                <block v-if="Farr.fieldname == 'aboutus'">
                  <view :class="'ico span' + (Farr.v == '' ? '' : ' ed')" @tap="aboutusFn">{{
                      Farr.v
                    }}{{ Farr.v == 0 || Farr.v == '' ? '请输入' : '' }}
                  </view>
                  <view v-if="div_in_aboutus" :class="'mask1 ' + mask_class">
                    <view class="div_box big_normal div_in_aboutus"
                          style="--div_box_width: 82%; --div_box_height: 500rpx">
                      <view class="close ico" @tap="div_in_aboutus_closeFn"></view>
                      <form :data-f="Farr.fieldname" :data-idx="idx" class="aboutus_form" @submit="aboutus_submitFn">
                        <view class="aboutus_box">
                          <view class="S16 B">{{ Farr.title }}</view>
                          <textarea
                              :focus="if_aboutus_focus"
                              :value="Farr.v"
                              name="aboutus"
                              placeholder="简单介绍下自己的工作生活、三观或故事~"
                          ></textarea>
                        </view>
                        <button :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="btn44 W100_"
                                formType="submit"
                                type="button" @tap="exit">
                          保存
                        </button>
                      </form>
                    </view>
                  </view>
                </block>
                <block v-else-if="Farr.fieldname == 'mob'">
                  <button
                      v-if="D.rz_mob == 1"
                      :class="'span' + (globalUtils.empty(FORMDATA.mob) || FORMDATA.mob == '' ? '' : ' ed')"
                      openType="getPhoneNumber"
                      @getphonenumber="getmobFn"
                  >
                    {{ globalUtils.empty(FORMDATA.mob) || FORMDATA.mob == '' ? '请输入' + Farr.title : FORMDATA.mob }}
                  </button>
                  <input
                      v-else
                      :class="Farr.v == 0 || Farr.v == '' ? '' : ' ed'"
                      :data-f="Farr.fieldname"
                      :data-idx="idx"
                      :placeholder="'请输入' + Farr.title"
                      :value="Farr.v == 0 || Farr.v == '' ? '' : Farr.v"
                      confirmType="完成"
                      maxlength="11"
                      placeholderStyle="color:#bbb"
                      type="number"
                      @blur="Ffn1_basic"
                  />
                </block>
                <input
                    v-else
                    :class="Farr.v == 0 || Farr.v == '' ? '' : ' ed'"
                    :data-f="Farr.fieldname"
                    :data-idx="idx"
                    :placeholder="'请输入' + Farr.title"
                    :value="Farr.v == 0 || Farr.v == '' ? '' : Farr.v"
                    confirmType="完成"
                    maxlength="50"
                    placeholderStyle="color:#bbb"
                    type="text"
                    @blur="Ffn1_basic"
                />
              </view>
            </view>

            <picker
                v-else-if="Farr.subkind == 2 || Farr.subkind == 4"
                :data-f="Farr.fieldname"
                :data-idx="idx"
                :headerText="'请选择' + Farr.title"
                :range="UDATA_var[Farr.fieldname]"
                :value="Farr.k"
                class="dl"
                rangeKey="v"
                @change="Ffn2_basic"
            >
              <view class="dt">{{ Farr.title }}</view>
              <view class="dd">
                <text :class="'span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                    Farr.v
                  }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                </text>
              </view>
            </picker>

            <view v-else-if="Farr.subkind == 3" :data-f="Farr.fieldname" :data-i="Farr.i" :data-idx="idx" class="dl"
                  @tap="Ffn3_ext">
              <view class="dt">{{ Farr.title }}</view>
              <view class="dd">
                <text :class="'ico span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                    Farr.v
                  }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                </text>
              </view>
            </view>

            <block v-else-if="Farr.subkind == 5">
              <picker
                  v-if="Farr.fieldname == 'birthday'"
                  :data-f="Farr.fieldname"
                  :data-idx="idx"
                  :end="Farr.end"
                  :headerText="'请选择' + Farr.title"
                  :range="UDATA_var[Farr.fieldname]"
                  :start="Farr.start"
                  :value="Farr.k"
                  class="dl"
                  mode="date"
                  rangeKey="v"
                  @change="birthdayFn"
              >
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <text :class="'span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                      Farr.v
                    }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                  </text>
                </view>
              </picker>
              <picker
                  v-else-if="Farr.fieldname == 'areaid'"
                  :data-f="Farr.fieldname"
                  :data-idx="idx"
                  :headerText="'请选择' + Farr.title"
                  :range="areaidARRDEF"
                  :value="areaidIdx"
                  class="dl"
                  mode="multiSelector"
                  rangeKey="v"
                  @change="areaidFn"
                  @columnchange="areaidChangeFn"
              >
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <text :class="'span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">
                    {{ Farr.v }}{{ Farr.v }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                  </text>
                </view>
              </picker>
              <picker
                  v-else-if="Farr.fieldname == 'area2id'"
                  :data-f="Farr.fieldname"
                  :data-idx="idx"
                  :headerText="'请选择' + Farr.title"
                  :range="area2idARRDEF"
                  :value="area2idIdx"
                  class="dl"
                  mode="multiSelector"
                  rangeKey="v"
                  @change="area2idFn"
                  @columnchange="area2idChangeFn"
              >
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <text :class="'span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">
                    {{ Farr.v }}{{ Farr.v }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                  </text>
                </view>
              </picker>
            </block>
          </block>
          <view v-if="(D.agree_reg == 1 || D.agree_wxshare == 1) && D.mbkind == 2" class="modlist">
            <view class="ul">
              <view class="li nogo">
                <text class="h4">同意自动注册正式用户</text>
                <switch :checked="D.agree_reg == 1" :color="D.mbbgcolor" @change="agree_regFn"></switch>
              </view>
              <view class="li nogo">
                <text class="h4">同意平台分享朋友圈/公众号</text>
                <switch :checked="D.agree_wxshare == 1" :color="D.mbbgcolor" @change="agree_wxshareFn"></switch>
              </view>
            </view>
          </view>
        </view>
      </view>
      <block v-if="ifzoyq == 1">
        <view v-if="D.mbkind == 1" class="tbody">
          <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="h2">
            择偶要求
            <text class="b"></text>
          </view>
          <view class="h5">
            <view>不要为幸福设置太高门槛，不要以貌、以财取人</view>
            <view>相处后才有可能找到真爱</view>
          </view>
        </view>
        <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="regbox zoyq">
          <view class="dashed">
            <view v-if="D.mbkind == 2" :style="'background:url(' + D.tbodyIMG + ')left top/100% 100% no-repeat;'"
                  class="tbody_img">
              <view class="span">择偶要求</view>
            </view>
            <block v-for="(Farr, idx) in D_mate" :key="idx">
              <view v-if="Farr.subkind == 1" class="dl">
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <block v-if="Farr.fieldname == 'other'">
                    <view :class="'ico span' + (Farr.v == '' ? '' : ' ed')" style="width: 100%" @tap="mate_otherFn">
                      {{ Farr.v }}{{ Farr.v == 0 || Farr.v == '' ? '请输入' : '' }}
                    </view>
                    <view v-if="div_in_mate_other" :class="'mask1 ' + mask_class">
                      <view class="div_box big_normal div_in_aboutus"
                            style="--div_box_width: 82%; --div_box_height: 500rpx">
                        <view class="close ico" @tap="div_in_mate_other_closeFn"></view>
                        <form :data-f="Farr.fieldname" :data-idx="idx" class="aboutus_form"
                              @submit="mate_other_submitFn">
                          <view class="aboutus_box">
                            <view class="S16 B">你对Ta的{{ Farr.title }}</view>
                            <textarea
                                :focus="mate_other_focus"
                                :value="Farr.v"
                                name="mate_other"
                                placeholder="例如：对方三观或你的特殊要求 （内容请控制在100字以内）"
                            ></textarea>
                          </view>
                          <button :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="btn44 W100_"
                                  formType="submit"
                                  type="button" @tap="exit">
                            保存
                          </button>
                        </form>
                      </view>
                    </view>
                  </block>
                  <input
                      v-else
                      :class="Farr.v == 0 || Farr.v == '' ? '' : ' ed'"
                      :data-f="Farr.fieldname"
                      :data-idx="idx"
                      :placeholder="'请输入' + Farr.title"
                      :value="Farr.v == 0 || Farr.v == '' ? '' : Farr.v"
                      confirmType="完成"
                      maxlength="50"
                      placeholderStyle="color:#bbb"
                      type="text"
                      @blur="Ffn1_mate"
                  />
                </view>
              </view>

              <picker
                  v-else-if="Farr.subkind == 2"
                  :data-f="Farr.fieldname"
                  :data-idx="idx"
                  :headerText="'你期望TA的' + Farr.title"
                  :range="UDATA_var[Farr.fieldname]"
                  :value="Farr.k"
                  class="dl"
                  rangeKey="v"
                  @change="Ffn2_mate"
              >
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <text :class="'ico span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                      Farr.v
                    }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                  </text>
                </view>
              </picker>

              <view v-else-if="Farr.subkind == 3" :data-f="Farr.fieldname" :data-i="Farr.i" :data-idx="idx" class="dl"
                    @tap="Ffn3_mate">
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <text :class="'ico span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                      Farr.v
                    }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                  </text>
                </view>
              </view>

              <picker
                  v-else-if="Farr.subkind == 4"
                  :data-f="Farr.fieldname"
                  :data-idx="idx"
                  :headerText="'你期望TA的' + Farr.title"
                  :range="Farr.rang_ARR"
                  :value="Farr.rang_Idx"
                  class="dl"
                  mode="multiSelector"
                  rangeKey="v"
                  @change="Ffn4_mate"
                  @columnchange="Ffn4_change_mate"
              >
                <view class="dt">{{ Farr.title }}</view>
                <view class="dd">
                  <text :class="'ico span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                      Farr.v
                    }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                  </text>
                </view>
              </picker>

              <block v-else-if="Farr.subkind == 5">
                <picker
                    v-if="Farr.fieldname == 'areaid'"
                    :data-f="Farr.fieldname"
                    :data-idx="idx"
                    :headerText="'你期望TA的' + Farr.title"
                    :range="Farr.def"
                    :value="Farr.idx"
                    class="dl"
                    data-kind="job"
                    mode="multiSelector"
                    rangeKey="v"
                    @change="areaidFn_mate"
                    @columnchange="areaidChangeFn_mate"
                >
                  <view class="dt">{{ Farr.title }}</view>
                  <view class="dd">
                    <text :class="'ico span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                        Farr.v
                      }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                    </text>
                  </view>
                </picker>
                <picker
                    v-else-if="Farr.fieldname == 'areaid2'"
                    :data-f="Farr.fieldname"
                    :data-idx="idx"
                    :headerText="'你期望TA的' + Farr.title"
                    :range="Farr.def"
                    :value="Farr.idx"
                    class="dl"
                    data-kind="hj"
                    mode="multiSelector"
                    rangeKey="v"
                    @change="areaidFn_mate"
                    @columnchange="areaidChangeFn_mate"
                >
                  <view class="dt">{{ Farr.title }}</view>
                  <view class="dd">
                    <text :class="'ico span' + (Farr.v == 0 || Farr.v == '' ? '' : ' ed')">{{
                        Farr.v
                      }}{{ Farr.v == 0 || Farr.v == '' ? '请选择' : '' }}
                    </text>
                  </view>
                </picker>
              </block>
            </block>
          </view>
        </view>
      </block>
      <view v-if="(D.agree_reg == 1 || D.agree_wxshare == 1) && D.mbkind == 1" class="modlist">
        <view class="ul">
          <view class="li nogo">
            <text class="h4">同意自动注册正式用户</text>
            <switch :checked="D.agree_reg == 1" :color="color" @change="agree_regFn"></switch>
          </view>
          <view class="li nogo">
            <text class="h4">同意平台分享朋友圈/公众号等</text>
            <switch :checked="D.agree_wxshare == 1" :color="color" @change="agree_wxshareFn"></switch>
          </view>
        </view>
      </view>
      <view v-if="D.mbkind === '2' && !globalUtils.empty(content)  " class="regbox content">
        <view class="dashed">
          <rich-text :nodes="content" class="form_detail_C"></rich-text>
        </view>
      </view>
      <view v-if="div_login" class="mask1 alpha0_100">
        <view
            :style="'--div_box_width:580rpx;--div_box_height:540rpx;background:-webkit-linear-gradient(top,rgba(' + rgbcolor + ',.3),#fff 25%);background-color: #fff;'"
            class="div_box"
        >
          <form :style="'--color:' + color + ';--rgbcolor:' + rgbcolor + ';'" class="MobMaskWin"
                @submit="form_MobMaskWinFn">
            <view class="closebtm ico" @tap.stop.prevent="onLogin">
            </view>
            <view class="dl">
              <view class="dt">
                <text class="i ico"></text>
              </view>
              <view class="dd">
                <input
                    :value="mob"
                    maxlength="11"
                    name="mob"
                    placeholder="请输入手机号"
                    placeholderStyle="color:#aaa;font-size:30rpx"
                    type="number"
                    @input="mobChangeFn"
                />
              </view>
            </view>
            <view class="dl">
              <view class="dt">
                <text class="i ico"></text>
              </view>
              <view class="dd yzmF">
                <input
                    :value="verify"
                    confirmType="done"
                    maxlength="4"
                    name="verify"
                    placeholder="请输入验证码"
                    placeholderStyle="color:#aaa;font-size:30rpx"
                    style="width: 180rpx"
                    type="number"
                    @input="verifyChangeFn"
                />
                <view v-if="yzmbtnFlag == 'send'" :data-mob="mob" class="yzmbtn" @tap="verifyFn">发送验证码</view>
                <text v-if="yzmbtnFlag == 'djs'" class="yzmbtn djs">
                  重新发送
                  <text class="b">{{ countdown }}</text>
                  s
                </text>
                <text v-if="yzmbtnFlag == 'reset'" :data-mob="mob" class="yzmbtn reset" @tap="verifyFn">重新发送</text>
              </view>
            </view>
            <button class="btn44" formType="submit">确定</button>
          </form>
        </view>
      </view>
      <view :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="Btmbtn">
        <view v-if="D.ifbmed == 2" class="btn5 W90_ flag_doing">资料上传中..</view>
        <view v-else-if="D.ifbmed == 1" class="btn5 W90_ flag_hui">{{ D.btnstr }}</view>
        <view v-else class="btn5 W90_" @tap="btn5Fn">{{ globalUtils.empty(D.btnstr) ? '加载中..' : D.btnstr }}</view>
      </view>
      <view v-if="D.ifbmed == 1" class="mask1 alpha0_100" style="z-index: 1">

      </view>
      <!-- parse <include src="../div_bottom_checkbox.wxml"></include> -->
      <block>
        <view v-if="if_div_bottom" :class="'mask1 ' + div_bottom_mask_class" @tap.stop.prevent="div_bottom_close_Fn">
          <view :class="'div_bottom ' + div_bottom_box_class" @tap.stop.prevent="div_bottom_blank_Fn">
            <view class="T">
              <text class="cancel" @tap.stop.prevent="div_bottom_close_Fn">取消</text>
              <text class="center">支持多项选择</text>
              <text :style="'color:' + (D.mbkind == 2 ? D.mbbgcolor : color)" class="save"
                    @tap.stop.prevent="div_bottom_save_Fn">确定
              </text>
            </view>
            <view class="C">
              <checkbox-group class="checkbox_li" @change="checkboxChangeFn">
                <label v-for="(item, index) in checkbox_arr" :key="index" class="a">
                  <checkbox :checked="item.ed" :value="item.i"></checkbox>

                  {{ item.v }}
                </label>
              </checkbox-group>
            </view>
          </view>
        </view>
      </block>
      <!-- parse <include src="../component/sorry.wxml"></include> -->
      <block>
        <view v-if="div_vip" :class="'mask2 ' + mask_class" data-maskid="div_vip" @tap="mask_closeFn">
          <view :style="'--div_box_width:600rpx;--div_box_height:' + (div_vip_H > 0 ? div_vip_H : 480) + 'rpx;'"
                class="div_box div_vip"
                @tap.stop.prevent="emptyFn">
            <view class="closebtm ico" data-maskid="div_vip" @tap.stop.prevent="mask_closeFn"></view>
            <view class="h1">{{ div_vip_title }}</view>
            <text v-if="!globalUtils.empty(div_vip_content)" class="C S15">{{ div_vip_content }}</text>
            <block v-else>
              <view class="C S15">开通VIP超级会员，专享超值权益</view>
              <view class="C S15">相亲成功率大大提升</view>
            </block>
            <view class="ico picico"></view>
            <view class="btn_btm btn44 ico" @tap.stop.prevent="vipFn"> 立即开通</view>
          </view>
        </view>
        <view v-if="div_cert" :class="'mask2 ' + mask_class" data-closekind="back" data-maskid="div_cert"
              @tap="mask_closeFn">
          <view class="div_box div_cert" style="--div_box_width: 600rpx; --div_box_height: 480rpx"
                @tap.stop.prevent="emptyFn">
            <view class="closebtm ico" data-closekind="back" data-maskid="div_cert" @tap.stop.prevent="mask_closeFn">
            </view>
            <view class="h1">{{ div_cert_title }}</view>
            <view class="C S15">成为认证用户，即享沟通特权</view>
            <view class="C S15">提高诚信值，杜绝虚假</view>
            <view class="ico picico"></view>
            <view class="btn_btm btn44 ico" @tap.stop.prevent="certFn">立即认证</view>
          </view>
        </view>
        <view v-if="div_data" :class="'mask2 ' + mask_class" data-closekind="back" data-maskid="div_data"
              @tap="mask_closeFn">
          <view
              :style="'--div_box_width:600rpx;--div_box_height:490rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
              class="div_box div_data"
              @tap.stop.prevent="emptyFn"
          >
            <view class="closebtm ico" data-closekind="back" data-maskid="div_data" @tap.stop.prevent="mask_closeFn">
            </view>
            <view class="h1">{{ div_data_title }}</view>
            <view class="C S15">赶快去完善，解锁更多功能</view>
            <view class="C S15">完成资料，上传头像，受关注度暴增</view>
            <view class="C S15 Cf00">如果还未审核，请等待审核</view>
            <view class="ico picico"></view>
            <view class="btn_btm btn44 ico" @tap.stop.prevent="dataFn">立即完善</view>
          </view>
        </view>
        <view v-if="div_gps" :class="'mask2 ' + mask_class" data-closekind="back" data-maskid="div_gps"
              @tap="mask_closeFn">
          <view
              :style="'--div_box_width:550rpx;--div_box_height:480rpx;--color:' + color + ';--rgbcolor:' + rgbcolor"
              class="div_box div_gps"
              @tap.stop.prevent="emptyFn"
          >
            <view class="closebtm ico" data-closekind="back" data-maskid="div_gps" @tap.stop.prevent="mask_closeFn">
            </view>
            <view class="h1">{{ div_gps_title }}</view>
            <view class="C S15">授权后，将自动获取您当前位置</view>
            <view class="C S15">否则将无法使用《附近的人》功能</view>
            <view class="ico picico"></view>
            <view class="btn_btm btn44 ico" @tap.stop.prevent="gpsFn">同意获取位置</view>
          </view>
        </view>
      </block>
      <view v-if="D.kefupic != ''" :style="'--color:' + (D.mbkind == 2 ? D.mbbgcolor : color)"
            class="btmKefuBtn loop_s_b_s"
            @tap="kefuFn">
        <view class="i ico"></view>
        客服
      </view>
      <view v-if="kefushow" class="mask2 alpha0_100">
        <view class="div_box big_normal" style="--div_box_width: 70%; --div_box_height: 626rpx">
          <view class="close ico" @tap="kefu_closeFn"></view>
          <view class="truename">联系经纪人</view>
          <view class="kf_wxpic">
            <image :showMenuByLongpress="true" :src="D.kefupic"></image>
          </view>
          <rich-text :nodes="D.kefutips" class="kf_text"></rich-text>
        </view>
      </view>
      <view v-if="backtop_flag" :style="'color:' + (D.mbkind == 2 ? D.mbbgcolor : color)" class="backtop fadeInUp"
            data-id="index" @tap="backtopFn">
        <text class="ico icon-backtop"></text>
        顶部
      </view>
      <view class="form_detail_bottom">{{ D.btmstr }}</view>
      <view v-if="div_login_ys" class="mask1 alpha0_100">
        <view
            :style="'--div_box_width:75%;--div_box_height:550rpx;background:-webkit-linear-gradient(top,rgba(' + rgbcolor + ',.3),#fff 25%);background-color: #fff;'"
            class="div_box big_normal"
        >
          <view class="S18 h2">服务协议及隐私保护</view>
          <view class="S15">
            为了更好地保障您的合法权益，请您阅读并同意以下协议
            <navigator :style="'color:' + color + ';'" hoverClass="none" url="/pagesA/about/law?kind=agreement">
              《用户服务协议》
            </navigator>
            和
            <navigator :style="'color:' + color + ';'" hoverClass="none" url="/pagesA/about/law?kind=declara">
              《个人隐私条款》
            </navigator>
          </view>
          <button :style="'--color:' + color + ';--rgbcolor:' + rgbcolor" class="btn5" @tap="ysFn">同意</button>
          <view class="C999 S18" @tap="back">不同意</view>
        </view>
      </view>
      <view class="blank"></view>
      <privacy-popup @agree="privacy_agree" @disagree="privacy_disagree"></privacy-popup>
    </view>
  </view>
</template>

<script>
import privacyPopup from '@/components/privacyPopup/privacyPopup';
import globalUtils from "../../res/www.a9a.cn";

var a;
var t = require('../../@babel/runtime/helpers/defineProperty');
var e = require('../../res/www.a9a.cn.js');
var app = getApp();
var s = 'mate_';
export default {
  computed: {
    globalUtils() {
      return globalUtils
    }
  },
  components: {
    privacyPopup
  },
  data() {
    return {
      div_login_ys: false,
      kefushow: false,
      form_agree_reg: 1,
      form_agree_wxshare: 1,
      FORMDATA: {
        mob: ''
      },
      FORMDATA_MATE: {},
      PARR: [],
      ifwin: true,
      yzmbtnFlag: 'send',
      sms_yzmnum_tmp: 0,
      tguid: 0,
      admid: 0,
      div_in_aboutus: false,
      mask_class: 'alpha0_100',
      areaidARR: [],
      areaidARRDEF: [],
      areaidIdx: [],
      area2idARR: [],
      area2idARRDEF: [],
      area2idIdx: [],
      checkboxvalue: [],
      ifmate: false,
      ifregsuccess: false,
      color: '',
      rgbcolor: '',
      fid: '',
      backtop_flag: false,
      ifphoto_s: '',
      vip_id: '',
      upMaxMB: '',
      ifzoyq: '',

      D: {
        mbkind: 0,
        mbbgcolor: '',
        path_b: '',
        tbodyIMG: '',
        rz_mob: 0,
        agree_reg: 0,
        agree_wxshare: 0,
        ifbmed: 0,
        btnstr: '',
        kefupic: '',
        kefutips: '',
        btmstr: ''
      },

      mbbgcolor_rgb: '',
      SHARE: '',
      content: '',
      D_basic: '',
      D_mate: '',
      UDATA_var: {},
      sms_yzmnum: '',
      s: '',
      arealeval: '',
      div_bm_add: false,
      U: '',
      div_bbs: false,
      div_login: false,
      if_aboutus_focus: false,
      div_in_mate_other: false,
      if_mate_other_focus: false,
      if_div_bottom: false,
      div_bottom_mask_class: '',
      div_bottom_box_class: '',
      checkbox_F: '',
      checkbox_idx: '',
      checkbox_arr: '',
      verify: '',
      mob: '',
      countdown: '',
      Farr: {
        subkind: 0,
        title: '',
        fieldname: '',
        v: '',
        k: '',
        i: '',
        end: '',
        start: '',
        rang_ARR: '',
        rang_Idx: '',
        def: '',
        idx: ''
      },
      mate_other_focus: [],
      div_vip: '',
      div_vip_H: 0,
      div_vip_title: '',
      div_vip_content: '',
      div_cert: '',
      div_cert_title: '',
      div_data: '',
      div_data_title: '',
      div_gps: false,
      div_gps_title: ''
    };
  },
  onLoad: function (a) {
    console.log('获取传值', a)
    var that = this;
    var s = 0;
    var o = 0;
    var d = 0;
    app.globalData.get_config('_ZEAI').then(function (a) {
      that.setData({
        color: app.globalData._ZEAI.color,
        rgbcolor: e.c16_rgb(app.globalData._ZEAI.color)
      });
    });
    if (e.ifint(a.fid)) {
      s = e.ifint(a.fid) ? a.fid : 0;
      o = e.ifint(a.tguid) ? a.tguid : 0;
      d = e.ifint(a.admid) ? a.admid : 0;
    } else {
      for (var n = decodeURIComponent(a.scene), r = {}, c = 0; c < n.split('*').length; c++) {
        var u = n.split('*')[c].split('/');
        r[u[0]] = u[1];
      }
      s = e.ifint(r.f) ? r.f : 0;
      d = e.ifint(r.a) ? r.a : 0;
      o = e.ifint(r.t) ? r.t : 0;
    }
    this.setData({
      fid: s,
      tguid: o,
      admid: d
    });
    app.globalData.get_openid().then(function (a) {
      that.init();
    });
    app.globalData.get_navigationBarTopHeight(that);
  },
  onPageScroll: function (a) {
    a.scrollTop > 400
        ? this.setData({
          backtop_flag: true
        })
        : this.setData({
          backtop_flag: false
        });
  },
  onShareAppMessage: function () {
    return {
      imageUrl: this.SHARE.imgurl,
      title: this.SHARE.title,
      path: '/pagesA/form/form_detail?fid=' + this.fid
    };
  },
  onShareTimeline: function () {
    var a;
    a = {
      imageUrl: this.SHARE.imgurl,
      title: this.SHARE.title,
      query: ''
    };
    t(a, 'query', 'fid=' + this.fid);
    t(a, 'path', '/pagesA/form/form_detail');
    return a;
  },
  methods: {
    init: function () {
      var that = this;
      e.ifint(this.fid) ||
      uni.showModal({
        content: '参数跑路了',
        confirmColor: that.color,
        confirmText: '朕知道了',
        showCancel: false,
        success: function (a) {
          uni.navigateBack();
        }
      });
      uni.showLoading({
        title: '玩命加载中...',
        mask: true
      });
      a = uni.getStorageSync('COOK_U');
      app.globalData.ajax({
        url: 'form.php',
        data: {
          submitok: 'form_detail',
          openid: a.openid,
          fid: that.fid
        },
        success: function (a) {
          if (1 == a.flag) {
            var i = e.escape2Html(a.D.content);
            that.vip_id = +a.D.vip_id
            if (a.D.ifbmed === '1') {
              uni.showToast({
                title: '您已提交表单！！',
                icon: 'none',
                mask: true
              });
              setTimeout(function () {
                uni.switchTab({
                  url: '/pages/my/my',
                })
              }, 1000)
              // uni.redirectTo({
              //   url: `/pagesA/form/formDetailPayment/formDetailPayment?fid=${that.fid}&formuid=${a.formuid}`
              // });
            } else {
              that.setData({
                ifphoto_s: a.ifphoto_s,
                upMaxMB: a.upMaxMB,
                ifzoyq: a.D.ifzoyq,
                D: a.D,
                mbbgcolor_rgb: e.c16_rgb(a.D.mbbgcolor),
                SHARE: a.SHARE,
                content: i,
                D_basic: a.D_basic,
                D_mate: a.D_mate,
                UDATA_var: a._UDATA,
                sms_yzmnum: a.sms_yzmnum,
                s: a.s,
                arealeval: a.arealeval,
                areaidARR: a.areaidARR,
                areaidARRDEF: a.areaidARR.ARRDEF,
                areaidIdx: a.areaidARR.Idx,
                area2idARR: a.area2idARR,
                area2idARRDEF: a.area2idARR.ARRDEF,
                area2idIdx: a.area2idARR.Idx,
                color: a.D.mbbgcolor,
              });
              uni.setNavigationBarTitle({
                title: a.D.title
              });
            }
          } else {
            uni.showToast({
              title: a.msg,
              icon: 'none',
              mask: true
            });
          }
          uni.hideLoading();
        }
      });
    },
    // 关闭获取手机框
    onLogin() {
      this.div_login = false;
    },
    bm_addFn: function () {
      var that = this;
      app.globalData.ajax({
        url: 'form.php',
        data: {
          submitok: 'bm_add',
          openid: a.openid,
          fid: that.fid
        },
        success: function (s) {
          1 == s.flag
              ? that.setData({
                div_bm_add: true,
                U: s.U
              })
              : 'pay' == s.flag
                  ? 1 == s.ifpay &&
                  uni.showModal({
                    title: '',
                    content: s.msg,
                    confirmColor: that.color,
                    cancelText: '取消',
                    confirmText: '联系支付',
                    success: function (s) {
                      if (s.confirm) {
                        1 != that.ios_ifpay.flag
                            ? uni.getSystemInfo({
                              success: function (a) {
                                uni.navigateTo({
                                  url: '../about/about'
                                });
                              }
                            })
                            : app.globalData.pay({
                              data: {
                                submitok: 'party_bm',
                                openid: a.openid,
                                fid: that.fid
                              },
                              success: function () {
                                that.init();
                              },
                              fail: function (a) {
                                a.this = that;
                                a.url = 'no';
                                e.sorry(a);
                              }
                            });
                      }
                    }
                  })
                  : ((s.this = that), (s.url = 'no'), e.sorry(s));
        }
      });
    },

    div_bm_add_submitFn: function (t) {
      var that = this;
      var o = t.detail.value;
      app.globalData.empty(o.sex)
          ? uni.showToast({
            title: '请选择【性别】',
            icon: 'none',
            mask: true
          })
          : app.globalData.ifmob(o.mob)
              ? app.globalData.ifweixin(o.weixin)
                  ? app.globalData.empty(o.truename)
                      ? uni.showToast({
                        title: '请输入【姓名】',
                        icon: 'none',
                        mask: true
                      })
                      : !app.globalData.empty(o.birthday) && e.ifint(o.birthday)
                          ? uni.showModal({
                            title: '',
                            content: '确定信息无误提交报名么？',
                            confirmColor: that.color,
                            cancelText: '取消',
                            confirmText: '确定',
                            success: function (t) {
                              if (t.confirm) {
                                uni.showLoading({
                                  title: '正在提交',
                                  mask: true
                                });
                                app.globalData.ajax({
                                  url: 'form.php',
                                  data: {
                                    submitok: 'bm_add_update',
                                    openid: a.openid,
                                    fid: that.fid,
                                    sex: o.sex,
                                    weixin: o.weixin,
                                    mob: o.mob,
                                    truename: o.truename,
                                    birthday: o.birthday
                                  },
                                  success: function (a) {
                                    uni.hideLoading();
                                    1 == a.flag
                                        ? uni.showModal({
                                          content: a.msg,
                                          confirmColor: that.color,
                                          confirmText: '朕知道了',
                                          showCancel: false,
                                          success: function (t) {
                                            that.setData({
                                              div_bm_add: false
                                            });
                                            1 == a.ifpay
                                                ? uni.showModal({
                                                  title: '',
                                                  content: a.ifpay_str,
                                                  confirmColor: that.color,
                                                  cancelText: '稍后支付',
                                                  confirmText: '联系支付',
                                                  success: function (a) {
                                                    a.confirm
                                                        ? uni.navigateTo({
                                                          url: '../about/about'
                                                        })
                                                        : that.init();
                                                  }
                                                })
                                                : that.init();
                                          }
                                        })
                                        : ((a.this = that), (a.url = 'no'), e.sorry(a));
                                  }
                                });
                              }
                            }
                          })
                          : uni.showToast({
                            title: '请输入【生年】',
                            icon: 'none',
                            mask: true
                          })
                  : uni.showToast({
                    title: '请输入【微信】',
                    icon: 'none',
                    mask: true
                  })
              : uni.showToast({
                title: '请输入【手机】',
                icon: 'none',
                mask: true
              });
    },

    mask_closeFn: function (a) {
      var that = this;
      var i = a.currentTarget.dataset.maskid;
      this.setData({
        mask_class: 'alpha100_0'
      });
      setTimeout(function () {
        var a;
        that.setData((t((a = {}), i, false), t(a, 'mask_class', 'alpha0_100'), a));
      }, 500);
    },

    bbs_btnFn: function () {
      var that = this;
      app.globalData.chklogin().then(function (t) {
        t
            ? that.setData({
              div_bbs: true
            })
            : uni.navigateTo({
              url: '/pages/login/login'
            });
      });
    },

    getPhoneNumber: function (a) {
      app.globalData.getPhoneNumber({
        e: a,
        url: '/pagesA/form/form_detail?id=' + this.fid
      });
    },

    getmobFn: function (e) {
      var that = this;
      uni.login({
        success: function (o) {
          uni.request({
            url: app.globalData.WWW + '/api/wxxcx/get_openid.php',
            data: {
              code: o.code
            },
            success: function (o) {
              o = app.globalData.jsoneval(o.data);
              a = uni.getStorageSync('COOK_U');
              uni.request({
                url: app.globalData.WWW + '/api/wxxcx/get_mob.php',
                data: {
                  session_key: encodeURIComponent(o.U.session_key),
                  encryptedData: encodeURIComponent(e.detail.encryptedData),
                  iv: encodeURIComponent(e.detail.iv),
                  openid: o.U.openid,
                  submitok: 'getmob'
                },
                success: function (a) {
                  a = app.globalData.jsoneval(a.data);
                  console.log(a);
                  app.globalData.ifmob(a.mob)
                      ? that.setData(t({}, 'FORMDATA.mob', a.mob))
                      : (that.setData({
                        div_login: true
                      }),
                          console.log('mob为空'));
                },
                fail: function (a) {
                  uni.showModal({
                    content: a,
                    showCancel: false
                  });
                }
              });
            }
          });
        }
      });
    },

    ysFn: function () {
      this.setData({
        div_login_ys: false
      });
    },

    back: function () {
      uni.navigateBack();
    },

    backtopFn: function (a) {
      uni.pageScrollTo({
        scrollTop: 0,
        duration: 300
      });
    },

    birthdayFn: function (a) {
      var e;
      var i = a.detail.value;
      var s = a.currentTarget.dataset.f;
      var o = a.currentTarget.dataset.idx;
      this.setData((t((e = {}), 'FORMDATA.' + s, i), t(e, 'D_basic[' + o + '].v', i), e));
    },

    Ffn1_basic: function (a) {
      var e;
      var s = a.currentTarget.dataset.f;
      var o = a.detail.value;
      var d = a.currentTarget.dataset.idx;
      'mob' != s ||
      app.globalData.ifmob(o) ||
      uni.showToast({
        title: '请输入正确的【手机号】',
        icon: 'none',
        mask: true
      });
      this.setData((t((e = {}), 'FORMDATA.' + s, o), t(e, 'D_basic[' + d + '].v', o), e));
    },

    agree_regFn: function (a) {
      var t = a.detail.value;
      t = t ? 1 : 0;
      this.setData({
        form_agree_reg: t
      });
    },

    agree_wxshareFn: function (a) {
      var t = a.detail.value;
      t = t ? 1 : 0;
      this.setData({
        form_agree_wxshare: t
      });
    },

    aboutusFn: function (a) {
      var that = this;
      that.setData({
        div_in_aboutus: true
      });
      setTimeout(function () {
        that.setData({
          if_aboutus_focus: true
        });
      }, 500);
    },

    mate_otherFn: function (a) {
      var that = this;
      that.setData({
        div_in_mate_other: true
      });
      setTimeout(function () {
        that.setData({
          if_mate_other_focus: true
        });
      }, 500);
    },

    div_in_aboutus_closeFn: function () {
      this.setData({
        div_in_aboutus: false
      });
    },

    div_in_mate_other_closeFn: function () {
      this.setData({
        div_in_mate_other: false
      });
    },

    aboutus_submitFn: function (a) {
      var e;
      var i = a.currentTarget.dataset.f;
      var s = a.currentTarget.dataset.idx;
      var o = a.detail.value.aboutus;
      this.setData((t((e = {}), 'FORMDATA.' + i, o), t(e, 'div_in_aboutus', false), t(e, 'if_aboutus_focus', false), t(e, 'D_basic[' + s + '].v', o), e));
    },

    mate_other_submitFn: function (a) {
      var e;
      var i = a.currentTarget.dataset.f;
      var o = a.currentTarget.dataset.idx;
      var d = a.detail.value.mate_other;
      this.setData((t((e = {}), 'FORMDATA_MATE.' + s + i, d), t(e, 'div_in_mate_other', false), t(e, 'if_mate_other_focus', false), t(e, 'D_mate[' + o + '].v', d), e));
    },

    Ffn2_basic: function (a) {
      var e;
      var i = a.detail.value;
      var s = a.currentTarget.dataset.f;
      console.log('获取的索引', s, i)
      console.log('获取的索引', this.UDATA_var)
      var o = this.UDATA_var[s][i];
      var d = a.currentTarget.dataset.idx;
      this.setData((t((e = {}), 'FORMDATA.' + s, o.i), t(e, 'D_basic[' + d + '].k', i), t(e, 'D_basic[' + d + '].v', o.v), e));
    },

    Ffn3_ext: function (a) {
      a.detail.value;
      var t = a.currentTarget.dataset.f;
      var i = a.currentTarget.dataset.i;
      var s = a.currentTarget.dataset.idx;
      var o = e.set_checked(i, this.UDATA_var[t]);
      this.setData({
        ifmate: false,
        if_div_bottom: true,
        div_bottom_mask_class: 'alpha0_100',
        div_bottom_box_class: 'div_upAnm1',
        checkbox_F: t,
        checkbox_idx: s,
        checkbox_arr: o
      });
    },

    checkboxChangeFn: function (a) {
      this.setData({
        checkboxvalue: a.detail.value
      });
    },

    div_bottom_save_Fn: function (a) {
      var o = this.checkbox_idx;
      var d = e.checkbox_div_list_get_listTitle(this.checkboxvalue, this.checkbox_arr);
      var n = this.checkboxvalue;
      if (n.length >= app.globalData.checkboxMaxNum) {
        uni.showToast({
          title: '最多选择 ' + app.globalData.checkboxMaxNum + ' 项',
          icon: 'none'
        });
        return false;
      }
      var r;
      var c;
      var u = e.set_checked(n, this.checkbox_arr);
      (this.div_bottom_close_Fn(), this.ifmate)
          ? this.setData(
              (t((r = {}), 'FORMDATA_MATE.' + s + this.checkbox_F, n.join(',')),
                  t(r, 'checkbox_arr', u),
                  t(r, 'D_mate[' + o + '].i', n.join(',')),
                  t(r, 'D_mate[' + o + '].v', d),
                  r)
          )
          : this.setData(
              (t((c = {}), 'FORMDATA.' + this.checkbox_F, n.join(',')),
                  t(c, 'checkbox_arr', u),
                  t(c, 'D_basic[' + o + '].i', n.join(',')),
                  t(c, 'D_basic[' + o + '].v', d),
                  c)
          );
    },

    div_bottom_close_Fn: function () {
      var that = this;
      this.setData({
        div_bottom_mask_class: 'alpha100_0',
        div_bottom_box_class: 'div_upAnm2'
      });
      setTimeout(function () {
        that.setData({
          if_div_bottom: false
        });
      }, 400);
    },

    div_bottom_blank_Fn: function () {
    },

    Ffn1_mate: function (a) {
      var e;
      var i = a.currentTarget.dataset.f;
      var o = a.detail.value;
      var d = a.currentTarget.dataset.idx;
      this.setData((t((e = {}), 'FORMDATA_MATE.' + s + i, o), t(e, 'D_mate[' + d + '].v', o), e));
    },

    Ffn2_mate: function (a) {
      var e;
      var i = a.detail.value;
      var o = a.currentTarget.dataset.f;
      var d = this.UDATA_var[o][i];
      var n = a.currentTarget.dataset.idx;
      this.setData((t((e = {}), 'FORMDATA_MATE.' + s + o, d.i), t(e, 'D_mate[' + n + '].k', i), t(e, 'D_mate[' + n + '].v', d.v), e));
    },

    Ffn3_mate: function (a) {
      a.detail.value;
      var t = a.currentTarget.dataset.f;
      var i = a.currentTarget.dataset.i;
      var s = a.currentTarget.dataset.idx;
      var o = e.set_checked(i, this.UDATA_var[t]);
      this.setData({
        ifmate: true,
        if_div_bottom: true,
        div_bottom_mask_class: 'alpha0_100',
        div_bottom_box_class: 'div_upAnm1',
        checkbox_F: t,
        checkbox_idx: s,
        checkbox_arr: o
      });
    },

    Ffn4_mate: function (a) {
      var i;
      var o = a.currentTarget.dataset.f;
      var d = a.detail.value;
      var n = a.currentTarget.dataset.idx;
      if (d[0] > d[1]) {
        uni.showToast({
          title: '必须左小右大哦',
          icon: 'none'
        });
        return false;
      }
      var r = this.D_mate[n].rang_ARR[0];
      var c = e.idx_iv(d, r);
      var u = c[0];
      var f = c[1];
      this.setData((t((i = {}), 'FORMDATA_MATE.' + s + o, u), t(i, 'D_mate[' + n + '].rang_Idx', d), t(i, 'D_mate[' + n + '].v', f), i));
    },

    Ffn4_change_mate: function (a) {
    },

    verifyChangeFn: function (a) {
      this.setData({
        verify: a.detail.value
      });
    },

    mobChangeFn: function (a) {
      this.setData({
        mob: a.detail.value
      });
    },

    verifyFn: function (t) {
      var s = t.currentTarget.dataset.mob;
      var that = this;
      that.sms_yzmnum_tmp >= that.sms_yzmnum && that.sms_yzmnum > 0
          ? uni.showToast({
            title: '重复发送过多暂停发送',
            icon: 'fail',
            mask: true,
            duration: 5000
          })
          : app.globalData.empty(s)
              ? uni.showToast({
                title: '请输入【手机号】',
                icon: 'none',
                mask: true
              })
              : app.globalData.ifmob(s)
                  ? app.globalData.ifmob(s) &&
                  ((a = uni.getStorageSync('COOK_U')),
                      app.globalData.ajax({
                        url: 'form.php',
                        data: {
                          submitok: 'verify_get',
                          mob: s,
                          openid: a.openid,
                          fid: that.fid
                        },
                        success: function (a) {
                          console.log(a.verify);
                          1 == a.flag
                              ? (uni.showToast({
                                title: a.msg,
                                icon: 'success',
                                mask: true,
                                duration: 4000
                              }),
                                  that.yzmtimeFn2(that.s),
                                  that.setData({
                                    sms_yzmnum_tmp: that.sms_yzmnum_tmp + 1,
                                    verify: '',
                                    yzmbtnFlag: 'djs'
                                  }))
                              : ((a.this = that), (a.url = 'no'), e.sorry(a));
                        }
                      }))
                  : uni.showToast({
                    title: '请输入正确的【手机号】',
                    icon: 'none',
                    mask: true
                  });
    },

    yzmtimeFn2: function (a) {
      var that = this;
      0 != a
          ? (that.setData({
            countdown: a
          }),
              a--,
              setTimeout(function () {
                that.yzmtimeFn2(a);
              }, 1000))
          : that.setData({
            yzmbtnFlag: 'reset'
          });
    },

    form_MobMaskWinFn: function (s) {
      var o = s.detail.value.mob;
      var d = s.detail.value.verify;
      var that = this;
      app.globalData.empty(o)
          ? uni.showToast({
            title: '请输入【手机号】',
            icon: 'none',
            mask: true
          })
          : app.globalData.ifmob(o)
              ? app.globalData.empty(d)
                  ? uni.showToast({
                    title: '请输入【验证码】',
                    icon: 'none',
                    mask: true
                  })
                  : ((a = uni.getStorageSync('COOK_U')),
                      app.globalData.ajax({
                        url: 'form.php',
                        data: {
                          submitok: 'verify_chk',
                          mob: o,
                          verify: d,
                          openid: a.openid,
                          fid: that.fid
                        },
                        success: function (a) {
                          var i;
                          1 == a.flag ? that.setData((t((i = {}), 'FORMDATA.mob', o), t(i, 'div_login', false), i)) : ((a.this = that), (a.url = 'no'), e.sorry(a));
                        }
                      }))
              : uni.showToast({
                title: '请输入正确的【手机号】',
                icon: 'none',
                mask: true
              });
    },

    areaidFn: function (a) {
      var i;
      var s = a.currentTarget.dataset.f;
      var o = a.detail.value;
      var d = a.currentTarget.dataset.idx;
      var n = e.areaGetTtitle(o, this.areaidARR);
      var r = n[0];
      var c = n[1];
      this.setData((t((i = {}), 'FORMDATA.' + s, r), t(i, 'FORMDATA.areatitle', c), t(i, 'D_basic[' + d + '].v', c), i));
    },

    areaidChangeFn: function (a) {
      var t;
      var i;
      var s;
      var o = parseInt(this.arealeval);
      var d = a.detail.column;
      var n = a.detail.value;
      var r =
          (a.currentTarget.dataset.idx,
              a.currentTarget.dataset.ifmate,
              {
                areaidARRDEF: this.areaidARRDEF,
                areaidIdx: this.areaidIdx
              });
      var c = this.areaidARR.ARR1;
      var u = this.areaidARR.ARR2;
      var f = this.areaidARR.ARR3;
      var m = this.areaidARR.ARR4;
      var l = c;
      var _ = [];
      var h = [];
      var x = [];
      switch (d) {
        case 0:
          switch (((t = c[n].i), o >= 2 && (i = (_ = e.areaNEW(t, u))[0].i), o >= 3 && (s = (h = e.areaNEW(i, f))[0].i), o >= 4 && (x = e.areaNEW(s, m)), o)) {
            case 1:
              r.areaidARRDEF = [l];
              r.areaidIdx = [n];
              break;
            case 2:
              r.areaidARRDEF = [l, _];
              r.areaidIdx = [n, 0];
              break;
            case 3:
              r.areaidARRDEF = [l, _, h];
              r.areaidIdx = [n, 0, 0];
              break;
            case 4:
              r.areaidARRDEF = [l, _, h, x];
              r.areaidIdx = [n, 0, 0, 0];
          }
          break;
        case 1:
          t = c[r.areaidIdx[0]].i;
          if (o >= 2) {
            i = (_ = e.areaNEW(t, u))[n].i;
          }
          if (o >= 3) {
            s = (h = e.areaNEW(i, f))[0].i;
          }
          if (o >= 4) {
            x = e.areaNEW(s, m);
          }
          if (o >= 3) {
            r.areaidARRDEF[2] = h;
          }
          if (o >= 4) {
            r.areaidARRDEF[3] = x;
          }
          if (o >= 2) {
            r.areaidIdx[1] = n;
          }
          if (o >= 3) {
            r.areaidIdx[2] = 0;
          }
          if (o >= 4) {
            r.areaidIdx[3] = 0;
          }
          break;
        case 2:
          t = l[r.areaidIdx[0]].i;
          if (o >= 2) {
            i = (_ = e.areaNEW(t, u))[r.areaidIdx[1]].i;
          }
          if (o >= 3) {
            s = (h = e.areaNEW(i, f))[n].i;
          }
          if (o >= 4) {
            x = e.areaNEW(s, m);
          }
          if (o >= 4) {
            r.areaidARRDEF[3] = x;
          }
          if (o >= 3) {
            r.areaidIdx[2] = n;
          }
          if (o >= 4) {
            r.areaidIdx[3] = 0;
          }
          break;
        case 3:
          if (o >= 4) {
            r.areaidIdx[3] = n;
          }
      }
      this.setData(r);
    },

    areaidFn_mate: function (a) {
      for (var o = a.currentTarget.dataset.kind, d = a.currentTarget.dataset.f, n = a.detail.value, r = a.currentTarget.dataset.idx, c = [], u = 0; u < n.length; u++) {
        if (n[u] > 0) {
          c.push(n[u] - 1);
        }
      }
      n = c;
      if ('hj' == o) {
        var f = e.areaGetTtitle(n, this.area2idARR);
      } else {
        f = e.areaGetTtitle(n, this.areaidARR);
      }
      var m = f[0];
      var l = f[1];
      var _ = app.globalData.empty(l) ? '不限' : l;
      if ('hj' == o) {
        var h;
        var x = 'areatitle2';
        this.setData((t((h = {}), 'FORMDATA_MATE.' + s + d, m), t(h, 'FORMDATA_MATE.' + s + x, l), t(h, 'D_mate[' + r + '].v', _), h));
      } else {
        var R;
        x = 'areatitle';
        this.setData((t((R = {}), 'FORMDATA_MATE.' + s + d, m), t(R, 'FORMDATA_MATE.' + s + x, l), t(R, 'D_mate[' + r + '].v', _), R));
      }
    },

    areaidChangeFn_mate: function (a) {
      var i;
      var s = a.currentTarget.dataset.kind;
      var o = 'hj' == s ? 4 : parseInt(this.arealeval);
      var d = a.detail.column;
      var n = a.detail.value;
      var r = a.currentTarget.dataset.idx;
      var c = {
        def: this.D_mate[r].def,
        idx: this.D_mate[r].idx
      };
      if ('hj' == s) {
        var u = this.area2idARR.ARR1;
        var f = this.area2idARR.ARR2;
        var m = this.area2idARR.ARR3;
        var l = this.area2idARR.ARR4;
      } else {
        u = this.areaidARR.ARR1;
        f = this.areaidARR.ARR2;
        m = this.areaidARR.ARR3;
        l = this.areaidARR.ARR4;
      }
      var _;
      var h;
      var x;
      var R = [
        {
          i: '0',
          v: '不限',
          f: '0'
        }
      ];
      var g = u;
      var A = [];
      var b = [];
      var v = [];
      switch (((g = R.concat(g)), d)) {
        case 0:
          if (0 == n) {
            switch (((c.def[0] = g), o >= 2 && (c.def[1] = R), o >= 3 && (c.def[2] = R), o >= 4 && (c.def[3] = R), o)) {
              case 1:
                c.idx = [0];
                break;
              case 2:
                c.idx = [0, 0];
                break;
              case 3:
                c.idx = [0, 0, 0];
                break;
              case 4:
                c.idx = [0, 0, 0, 0];
            }
          } else {
            switch (((_ = u[n - 1].i), o)) {
              case 1:
                c.def = [g];
                c.idx = [n];
                break;
              case 2:
                A = R.concat(e.areaNEW(_, f));
                c.def = [g, A];
                c.idx = [n, 0];
                break;
              case 3:
                A = R.concat(e.areaNEW(_, f));
                c.def = [g, A, R];
                c.idx = [n, 0, 0];
                break;
              case 4:
                A = R.concat(e.areaNEW(_, f));
                c.def = [g, A, R, R];
                c.idx = [n, 0, 0, 0];
            }
          }
          break;
        case 1:
          if (0 == n) {
            if (o >= 3) {
              c.def[2] = R;
            }
            if (o >= 4) {
              c.def[3] = R;
            }
            if (o >= 2) {
              c.idx[1] = n;
            }
            if (o >= 3) {
              c.idx[2] = 0;
            }
            if (o >= 4) {
              c.idx[3] = 0;
            }
          } else {
            switch (o) {
              case 2:
                c.idx[1] = n;
                break;
              case 3:
                _ = u[c.idx[0] - 1].i;
                h = (A = R.concat(e.areaNEW(_, f)))[n].i;
                b = R.concat(e.areaNEW(h, m));
                c.def[2] = b;
                c.idx[1] = n;
                c.idx[2] = 0;
                break;
              case 4:
                _ = u[c.idx[0] - 1].i;
                h = (A = R.concat(e.areaNEW(_, f)))[n].i;
                b = R.concat(e.areaNEW(h, m));
                c.def[2] = b;
                c.def[3] = R;
                c.idx[1] = n;
                c.idx[2] = 0;
                c.idx[3] = 0;
            }
          }
          break;
        case 2:
          if (0 == n) {
            if (o >= 4) {
              c.def[3] = R;
            }
            if (o >= 3) {
              c.idx[2] = n;
            }
            if (o >= 4) {
              c.idx[3] = 0;
            }
          } else {
            switch (o) {
              case 3:
                c.idx[2] = n;
                break;
              case 4:
                _ = u[c.idx[0] - 1].i;
                h = (A = R.concat(e.areaNEW(_, f)))[c.idx[1]].i;
                x = (b = R.concat(e.areaNEW(h, m)))[n].i;
                v = R.concat(e.areaNEW(x, l));
                c.def[3] = v;
                c.idx[2] = n;
                c.idx[3] = 0;
            }
          }
          break;
        case 3:
          if (o >= 4) {
            c.idx[3] = n;
          }
      }
      this.setData((t((i = {}), 'D_mate[' + r + '].def', c.def), t(i, 'D_mate[' + r + '].idx', c.idx), i));
    },

    area2idFn: function (a) {
      var i;
      var s = a.currentTarget.dataset.f;
      var o = a.detail.value;
      var d = a.currentTarget.dataset.idx;
      var n = e.areaGetTtitle(o, this.area2idARR);
      var r = n[0];
      var c = n[1];
      this.setData((t((i = {}), 'FORMDATA.' + s, r), t(i, 'FORMDATA.area2title', c), t(i, 'D_basic[' + d + '].v', c), i));
    },

    area2idChangeFn: function (a) {
      var t;
      var i;
      var s;
      var o = a.detail.column;
      var d = a.detail.value;
      var n =
          (a.currentTarget.dataset.idx,
              {
                area2idARRDEF: this.area2idARRDEF,
                area2idIdx: this.area2idIdx
              });
      var r = this.area2idARR.ARR1;
      var c = this.area2idARR.ARR2;
      var u = this.area2idARR.ARR3;
      var f = this.area2idARR.ARR4;
      var m = r;
      var l = [];
      var _ = [];
      var h = [];
      switch (o) {
        case 0:
          t = r[d].i;
          i = (l = e.areaNEW(t, c))[0].i;
          s = (_ = e.areaNEW(i, u))[0].i;
          h = e.areaNEW(s, f);
          n.area2idARRDEF = [m, l, _, h];
          n.area2idIdx = [d, 0, 0, 0];
          break;
        case 1:
          t = r[n.area2idIdx[0]].i;
          i = (l = e.areaNEW(t, c))[d].i;
          s = (_ = e.areaNEW(i, u))[0].i;
          h = e.areaNEW(s, f);
          n.area2idARRDEF[2] = _;
          n.area2idARRDEF[3] = h;
          n.area2idIdx[1] = d;
          n.area2idIdx[2] = 0;
          n.area2idIdx[3] = 0;
          break;
        case 2:
          t = m[n.area2idIdx[0]].i;
          i = (l = e.areaNEW(t, c))[n.area2idIdx[1]].i;
          s = (_ = e.areaNEW(i, u))[d].i;
          h = e.areaNEW(s, f);
          n.area2idARRDEF[3] = h;
          n.area2idIdx[2] = d;
          n.area2idIdx[3] = 0;
          break;
        case 3:
          n.area2idIdx[3] = d;
      }
      this.setData(n);
    },

    btn5Fn: function (s) {
      var that = this;
      a = uni.getStorageSync('COOK_U');
      var d = JSON.stringify(that.FORMDATA);
      var n = JSON.stringify(that.FORMDATA_MATE);
      app.globalData.ajax({
        url: 'form.php',
        data: {
          submitok: 'add_chk',
          FORMDATA: d,
          FORMDATA_MATE: n,
          fid: that.fid,
          openid: a.openid
        },
        success: function (s) {
          1 == s.flag
              ? (function () {
                var s = that.PARR.length;
                if (s > 0) {
                  var r = Array();
                  var c = 0;
                  !(function u() {
                    uni.showLoading({
                      title: '上传第' + parseInt(c + 1) + '张',
                      mask: true
                    });
                    uni.uploadFile({
                      url: app.globalData.WWW + '/api/wxxcx/form.php',
                      filePath: that.PARR[c],
                      name: 'pic',
                      formData: {
                        submitok: 'photo_s_uppic',
                        fid: that.fid,
                        openid: a.openid
                      },
                      success: function (f) {
                        if (1 == (f = e.jsoneval(f.data)).flag) {
                          r.push(f._s);
                          {
                            c++;
                            if (c < s) {
                              setTimeout(function () {
                                u();
                              }, 300);
                            } else {
                              uni.hideLoading();
                              var m = r.join(',');
                              that.setData(t({}, 'FORMDATA.photo_s', m));
                              d = JSON.stringify(that.FORMDATA);
                              app.globalData.ajax({
                                url: 'form.php',
                                data: {
                                  submitok: 'add_update',
                                  FORMDATA: d,
                                  FORMDATA_MATE: n,
                                  form_agree_reg: that.form_agree_reg,
                                  form_agree_wxshare: that.form_agree_wxshare,
                                  fid: that.fid,
                                  openid: a.openid,
                                  tguid: that.tguid,
                                  admid: that.admid
                                },
                                success: function (a) {
                                  1 == a.flag
                                      ? (uni.hideLoading(),
                                          uni.showToast({
                                            title: a.msg,
                                            mask: true,
                                            duration: 3000
                                          }),
                                          setTimeout(function () {
                                            console.log(that.vip_id > 0)
                                            if (that.vip_id > 0) {
                                              uni.redirectTo({
                                                url: `/pagesA/form/formDetailPayment/formDetailPayment?fid=${that.fid}&formuid=${a.formuid}`
                                              });
                                            } else {
                                              uni.switchTab({
                                                url: '/pages/index/index4',
                                              })
                                            }
                                          }, 3000))
                                      : (that.setData(t({}, 'D.ifbmed', 0)),
                                          uni.showToast({
                                            title: a.msg,
                                            icon: 'none',
                                            mask: true
                                          }));
                                }
                              });
                            }
                          }
                        } else {
                          uni.showModal({
                            content: f.msg,
                            confirmColor: that.color,
                            confirmText: '朕知道了',
                            showCancel: false,
                            success: function (a) {
                              uni.navigateBack();
                            }
                          });
                        }
                      }
                    });
                  })();
                } else {
                  app.globalData.ajax({
                    url: 'form.php',
                    data: {
                      submitok: 'add_update',
                      FORMDATA: d,
                      FORMDATA_MATE: n,
                      form_agree_reg: that.form_agree_reg,
                      form_agree_wxshare: that.form_agree_wxshare,
                      fid: that.fid,
                      openid: a.openid,
                      tguid: that.tguid,
                      admid: that.admid
                    },
                    success: function (a) {
                      1 == a.flag
                          ? (uni.hideLoading(),
                              uni.showToast({
                                title: a.msg,
                                mask: true,
                                duration: 3000
                              }),
                              setTimeout(function () {
                                uni.redirectTo({
                                  url: 'form_detail?fid=' + that.fid
                                });
                              }, 3000))
                          : (that.setData(t({}, 'D.ifbmed', 0)),
                              uni.showToast({
                                title: a.msg,
                                icon: 'none',
                                mask: true
                              }));
                    }
                  });
                }
              })()
              : (that.setData(t({}, 'D.ifbmed', 0)),
                  uni.showToast({
                    title: s.msg,
                    icon: 'none',
                    mask: true
                  }));
        }
      });
    },

    upFn: function () {
      var that = this;
      var e = 5 - parseInt(this.PARR.length);
      e <= 0
          ? uni.showToast({
            title: '最多上传5张图片哦',
            icon: 'none',
            mask: true
          })
          : uni.chooseMedia({
            count: e,
            mediaType: ['image'],
            sizeType: ['compressed'],
            sourceType: ['album', 'camera'],
            success: function (e) {
              for (var i = that.PARR, s = [], o = 0; o < e.tempFiles.length; o++) {
                s.push(e.tempFiles[o].tempFilePath);
              }
              i = i.concat(s);
              that.setData(
                  t(
                      {
                        PARR: i
                      },
                      'FORMDATA.photo_s',
                      i.join(',')
                  )
              );
            }
          });
    },

    delFn: function (a) {
      var t = a.currentTarget.dataset.url;
      var i = e.json_remove(this.PARR, t);
      this.setData({
        PARR: i
      });
    },

    kefuFn: function () {
      this.setData({
        kefushow: true
      });
    },

    kefu_closeFn: function () {
      this.setData({
        kefushow: false
      });
    },

    privacy_agree: function (a) {
      console.log('agree');
    },

    privacy_disagree: function (a) {
      console.log('disagree');
      uni.exitMiniProgram();
    },

    exit() {
      console.log('占位：函数 exit 未声明');
    },

    emptyFn() {
      console.log('占位：函数 emptyFn 未声明');
    },

    vipFn() {
      console.log('占位：函数 vipFn 未声明');
    },

    certFn() {
      console.log('占位：函数 certFn 未声明');
    },

    dataFn() {
      console.log('占位：函数 dataFn 未声明');
    },

    gpsFn() {
      console.log('占位：函数 gpsFn 未声明');
    }
  }
};
</script>
<style>
@import './form_detail.css';
</style>
